package com.example.programming.sys.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.programming.sys.entity.UcenterMember;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * 会员表 Mapper 接口 chrimer
 * </p>
 *
 * @author chrimer
 * @since 2020-09-02
 */
public interface UcenterMemberMapper extends BaseMapper<UcenterMember> {

    @Select("SELECT avatar FROM ucenter_member where nickname = #{name}")
    String getavatar(String name);

    @Update("UPDATE ucenter_member SET avatar=#{avatar} WHERE nickname=#{username}")
    void updateAvatar(String username,String avatar);

    @Select("SELECT id FROM ucenter_member where nickname = #{username}")
    String getIdByName(String username);
}
